/*
 * @copyright fxsen <br/>
 * @date 2022/3/31 15:24 <br/>
 * @email <a href="mailto:fxsen@foxmail.com">
 * @author fxsen
 */
package com.fxsen.commons.sysmanager.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fxsen.commons.core.base.common.entity.BaseEntity;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;

/**
 * 字典表
 * @author fxsen
 * @date 2022/3/31 15:24
 * @email <a href="mailto:fxsen@foxmail.com">
 */
@ApiModel("字典")
@TableName("sys_dictionary")
@TableComment(value = "字典表")
@Entity
public class Dictionary extends BaseEntity {
    private static final long serialVersionUID = -8224480938394557616L;
    public static final int TYPE_COMMON = 1;//普通类型
    public static final int TYPE_API_VALUE = 2; //API数值类别
    public static final int TYPE_API_DATA = 3; //API数据类别（选项类型）
    public static final int TYPE_API_PUBLIC = 4;//4.全局api
    public static final int TYPE_API_DATA_CHILD = 5; //API数据类别（直接返回类型）
    @ApiModelProperty("类别id")
    @TableField(value = "category_id")
    @Column(name = "category_id", type = MySqlTypeConstant.VARCHAR, comment = "类别id",length = 32)
    private String categoryId;
    @ApiModelProperty("字典名称")
    @TableField(value = "name")
    @Column(name = "name", type = MySqlTypeConstant.VARCHAR, comment = "字典名称",length = 100)
    private String name;
    @ApiModelProperty("字典类别标识码,外部程序传入该参数,获得字典字段集合。在表中不能重复")
    @TableField(value = "code")
    @Column(name = "code", type = MySqlTypeConstant.VARCHAR, comment = "字典编码",length = 100)
    private String code;
    @ApiModelProperty(name = "数据类型,1:普通类型, 2:api数值类型, 3:api数据类型")
    @TableField(value = "type")
    @Column(name = "type", type = MySqlTypeConstant.INT, comment = "字典类型",length = 1)
    private int type;

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
}
